package com.ruoyi.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

import java.sql.Timestamp;

/**
 * 系统消息对象 system_message
 * 
 * @author dam
 * @date 2023-07-21
 */
@Data
public class SystemMessage
{
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 逻辑删除 0：未删除 1：已删除
     */
    @Excel(name = "逻辑删除 0：未删除 1：已删除")
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    /** 发送者ID */
    @Excel(name = "发送者ID")
    private Long senderId;

    /** 消息编辑者 */
    @Excel(name = "消息编辑者")
    private Long editorId;

    /** 是否发布 */
    @Excel(name = "是否发布")
    private Long isPublish;

    private Timestamp createTime;

    private Timestamp updateTime;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String content;

    @Excel(name = "消息主题")
    private String subject;

    /** 消息类型0：给所有普通用户看 1：给学校管理员看 2：给系统管理员看3：给单独用户看 */
    @Excel(name = "消息类型0：给所有普通用户看 1：给学校管理员看 2：给系统管理员看3：给单独用户看")
    private Long type;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("isDeleted", getIsDeleted())
                .append("senderId", getSenderId())
                .append("editorId", getEditorId())
                .append("isPublish", getIsPublish())
                .append("content", getContent())
                .append("subject", getSubject())
                .append("type", getType())
                .toString();
    }
}
